﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddSupplement.aspx.cs" Inherits="com.huigo.Admin.Web.financial.AddSupplement" MasterPageFile="~/SubMain.Master"%>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript" src="../js/control.js"></script>
<script type="text/javascript">
function checkData()
{
    var custname = document.getElementById("<%=custName.ClientID %>");
    if (custname.value == '') {
        alert("经销商不能为空！");
        return false;
    }
    var payprice = document.getElementById("<%=payPrice.ClientID %>");
    if (payprice.value == '') {
        alert("充值金额不能为空！");
        return false;
    }
    var feeType = document.getElementById("<%=feeType.ClientID %>");
    if (feeType.value == '') {
        alert("请选择充值方式！");
        return false;
    }
    else {
        if (payprice.value <= 0) {
            alert("充值金额必须大于0！");
            return false;
        }
    }
    var payno = document.getElementById("<%=payNO.ClientID %>");
    if (payno.value == '') {
        alert("支付交易号不能为空！");
        return false;
    }
    var Meno = document.getElementById("<%=meno.ClientID %>");
    if (Meno.value == '') {
        alert("充值备注不能为空！");
        return false;
    }
    return true;
}
</script>
    <form id="form1" runat="server">
    <table>
    <tr><td class="tdleft">经销商</td><td><asp:TextBox ID="custName" onblur="checkCustName(this.value);" runat="server"></asp:TextBox><label id="price"></label></td></tr>
     <tr><td class="tdleft">充值方式</td><td><asp:DropDownList ID="feeType" runat="server"></asp:DropDownList> </td></tr>
    <tr><td class="tdleft">充值金额</td><td><asp:TextBox ID="payPrice" Text="0.00" onkeypress="if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/))this.value=this.t_value;else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value" onkeyup="if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/))this.value=this.t_value;else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value" onblur="if(!this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?|\.\d*?)?$/))this.value=this.o_value;else{if(this.value.match(/^\.\d+$/))this.value=0+this.value;if(this.value.match(/^\.$/))this.value=0;this.o_value=this.value}" runat="server"></asp:TextBox></td></tr>
    <tr><td class="tdleft">支付交易号</td><td><asp:TextBox ID="payNO" runat="server" Columns="50"></asp:TextBox></td></tr>
    <tr><td class="tdleft">充值备注</td><td><asp:TextBox ID="meno" runat="server" Columns="50"></asp:TextBox></td></tr>

    <tr><th colspan="2"><asp:Button runat="server" ID="btnSave" OnClientClick=" return checkData();" Text="保存" 
            onclick="btnSave_Click" /><asp:TextBox Visible="false" runat="server" ID="flgModify" Text="0"></asp:TextBox></th></tr></table>
    </form>

</asp:Content>
